module.exports = app => {
    const mongoose = app.mongoose;
    const Schema = mongoose.Schema;

    const VipSchema = new Schema({
        userName: { type: String, required: true },
        tell: { type: String, min: 11, required: true },
        passWord: { type: String, required: true },
        roleClass: { type: Number, required: true },
        // 余额
        currency: { type: Number, default: 0 },
        // 累计充值金额
        accruingAmounts: { type: Number, default: 0 },
        desc: { type: String, default: '这个会员很神秘' },
        createTime: {
            type: Date,
            default: Date.now
        },
        updateTime: {
            type: Date,
            default: Date.now
        }
    });
    
    return mongoose.model('Vips', VipSchema);
}